package com.hgw.Demo02CommandPattern.ExamplesUndoOperation;

/**
 * Data time:2021/12/16 20:44
 * StudentID:2019112118
 * Author:hgw
 * Description: 客户端测试类
 */
public class Client {
    public static void main(String[] args) {
        CalculatorForm form = new CalculatorForm();
        AbstractCommand command;
        command = new AddCommand();
        form.setCommand(command);   //相发送者注入命令对象

        form.compute(10);
        form.compute(5);
        form.compute(10);
        form.undo();
    }
}
